<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .c1{
            background-color: rgba(255,0,0,0.3); /* 背景颜色或者字体颜色等单独的透明度 */
            height: 100px;
            width: 100px;
        }
        .c2{
            background-color: rgb(255,0,0);
            height: 100px;
            width: 100px;
            opacity: 0.3;  /* 整个标签透明度 */
        }

    </style>
</head>
<body>

<div class="c1">
    你好
</div>
<div class="c2">
    我好
</div>


</body>
</html>